
#ifndef _MEMBER_BENUM_H_
#define _MEMBER_BENUM_H_

#include <BMap>
#include <BEnum>

#define enum_member(enm)	((member_BEnum*)((BEnum*)enm)->_ptr)

namespace BWE
{
	struct EnumPair
	{
		EnumPair()
		{
			value = -1;
		}
		EnumPair(const EnumPair& other)
		{
			key = other.key;
			value = other.value;
		}
		inline bool operator == (const char* key) const
		{
			return this->key == key;
		}
		inline bool operator == (const BString& key) const
		{
			return this->key == key;
		}
		inline bool operator == (int value) const
		{
			return this->value == value;
		}
		BString		key;
		int			value;
	};
	class member_BEnum
	{
	public:
		member_BEnum(BEnum* enm);
		~member_BEnum();

		BEnum*				boss;
		BString				type;
		BArray<EnumPair>	pairs;
	};

}

#endif